#ifndef LC_UTIL_MT03X_H
#define LC_UTIL_MT03X_H
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#ifdef __cplusplus
extern "C"
{
#endif

#define S_IR_USB_INDEX "ttyUSB0"
#define S_EXT_INDEX ("/dev/" S_IR_USB_INDEX)
#define EXT_BAUDRATE (115200)

    typedef uint64_t u64;
    typedef uint32_t u32;
    typedef uint16_t u16;
    typedef uint8_t u8;
    void Delay_ms(unsigned int MilliSecond);
    int IsInt(char *str);
    void com_ext_init(void);
    int com_ext_send(const uint8_t *buffer, int length);
    int com_ext_open(void);
    int com_ext_read(unsigned char *buf, int size);
    int is_file_exist(const char *file_path);
    extern void app_callback_flush_new_thermal_img(uint16_t *mtemp_buffer, uint32_t width, uint32_t height, float atemp, float ta);
#define DEBUG(format, ...) printf("#CC>" format "\n", ##__VA_ARGS__)
#define RAW_DEBUG(format, ...) printf(format, ##__VA_ARGS__)
#define DEBUGSTEP DEBUG("_%u", __LINE__)
#define DEBUGFSTEP DEBUG("%s_%u", __FUNCTION__, __LINE__)
#define DEBUGRAW RAW_DEBUG
#define EXT_COM_SUPPORT 1
#ifdef __cplusplus
} /* extern "C" */
#endif

#endif
